<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue的基础知识</title>
</head>
<body>
  <div id="app">
    <h2 id="info">张三</h2>
    <input type="text" name="" id="uname">
    <input type="button" value="修改" id="btn">
  </div>
  <script>
    let btn = document.querySelector("#btn")
    btn.onclick = function() {
      let input = document.querySelector("#uname")
      if(input) {
        let info = document.querySelector("#info");
        info.innerHTML = input.value;
      }
    }
  </script>
</body>
</html>